package com.woniuxy.service;

import com.woniuxy.controller.form.*;
import com.woniuxy.exception.CheckedIsNullException;
import com.woniuxy.exception.DdException;
import com.woniuxy.model.PawnAttrConf;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniuxy.utils.Result;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author hujianying
 * @since 2022-03-23
 */
public interface PawnAttrConfService extends IService<PawnAttrConf> {

    /**
     * 根据属性组id查询所有对应的属性配置
     * @param fcf groupCode
     * @return findConfInfo
     */
    Result getAllConfByGroupCode(FindConfForm fcf);

    /**
     * 模糊查询
     * @param fcf str
     * @return findConfInfo
     */
    Result getConfByLike(FindConfForm fcf);

    /**
     * 根据被选中的属性删除
     * @param dcf isChecked
     * @return data为null
     */
    Result deleteByChecked(@RequestBody DeleteConfForm dcf) throws CheckedIsNullException, DdException;

    /**
     * 根据attrCode获取conf
     * @param gocf attrCode
     * @return
     */
    Result getConfByAttrCode(GetOneConfForm gocf);
    /**
     * 修改属性参数
     * @param ucf UpdateConfForm
     * @return data为null
     */
    Result updateConf(@RequestBody UpdateConfForm ucf);

    /**
     * 新增属性参数
     * @param scf saveConfForm
     * @return data为null
     */
    Result saveConf(@RequestBody SaveConfForm scf) throws DdException;

    /**
     * 根据大类code获取属性组参数
     * @param gcbccf catCode
     * @return GetConfByCatCodeInfo
     */
    Result getConfByPcatCode(GetConfByCatCodeForm gcbccf);
}
